<div class="layui-row" style="width: 100%">
    <form class="layui-form search-form" lay-filter="search-form" style="display: flex;flex-wrap: wrap;flex: 1">
        <input type="hidden" name="is_search" value="1"/>
        <?php $revoke = false;?>
        {foreach name="search" item="vo" key='key'}
        <div class="layui-form-item  {if $vo.type == 'linkage'}layui-col-xs12 layui-col-sm12 layui-col-md4{else}layui-col-xs6 layui-col-sm6 layui-col-md2{/if} {if $key >= 5}hidden layui-hide{/if}">
            <?php if(request()->param($vo['key']))$revoke = true; ?>
            {switch vo.type}
            {case value="input"}
            <div class="layui-inline" style="width: 98%">
                <input class="layui-input" placeholder="{$vo.name}筛选" name="{$vo.key}"
                       value="<?php echo request()->param($vo['key']);?>"/>
            </div>
            {/case}
            {case value="select"}
            <div class="layui-inline" style="width: 98%">
                <select name="{$vo.key}">
                    <option value="">{$vo.name}</option>
                    {foreach name="vo.value" key="key" item="co"}
                    <?php if(request()->param($vo['key']) == $key){ ?>
                    <option value="{$key}" selected>{$co}</option>
                    <?php }else{ ?>
                    <option value="{$key}">{$co}</option>
                    <?php } ?>
                    {/foreach}
                </select>
            </div>
            {/case}

            {case value="linkage"}
            <?php $name = explode(',',$vo['name']);$field = explode(',',$vo['key']);?>
            <div class="sunSelect" data-url="{$vo.value}" data-value="id" data-name="title">
                <?php foreach($name as $key=>$vo){?>
                <?php if(request()->param($field[$key]))$revoke = true; ?>
                <div class="layui-input-inline" style="margin-right: 5px">
                    <select name="{$field[$key]}" data-name="{$vo}"
                            data-id="<?php echo request()->param($field[$key]);?>" lay-filter="sunSelect"></select>
                </div>
                <?php }?>
            </div>
            {/case}

            {case value="time"}
            <div class="layui-inline" style="width: 98%">
                <input class="layui-input date_range" placeholder="{$vo.name}筛选" name="{$vo.key}"
                       value="<?php echo request()->param($vo['key']);?>" style="" autocomplete="off"/>
            </div>
            {/case}

            {case value="date"}
            <div class="layui-inline" style="width: 98%">
                <input class="layui-input date" placeholder="{$vo.name}筛选" name="{$vo.key}"
                       value="<?php echo request()->param($vo['key']);?>" style="" autocomplete="off"/>
            </div>
            {/case}

            {default /}

            {/switch}
        </div>
        {/foreach}

    </form>
</div>
<div class="layui-form-item search_btn">
    <div class="layui-inline" style="margin-left: 2%;display: flex">
        <button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="search">
            查询
        </button>

        <button style="display: none" class="layui-btn layui-btn-danger layui-btn-sm resetSearch" lay-submit=""
                lay-filter="resetSearch">重置
        </button>

        {if count($search) >= 6}
        <a class="layui-btn layui-bg-red search_open layui-btn-sm">展开</a>
        {/if}
    </div>

</div>